import Mock from 'mockjs'
import permissionApi from './mockData/permission'
import userApi from './mockData/user'
import goodApi from './mockData/goods'
import orderApi from './mockData/order'
import cateApi from './mockData/cate'
import noteApi from './mockData/note'
/* 菜单栏 */
Mock.mock(/permission\/getMenu/, 'post', permissionApi.getMenu)
/* 用户列表 增删查改 */
Mock.mock(/user\/add/, 'post', userApi.addUser)
Mock.mock(/user\/edit/, 'post', userApi.editUser)
Mock.mock(/user\/getUser/, 'get', userApi.getUser)
Mock.mock(/user\/del/, 'post', userApi.deleteUser)
//获取所有用户
Mock.mock(/user\/getProvince/, 'get', userApi.getProvince)
//获取所有订单
Mock.mock(/order\/getisPay/, 'get', orderApi.getisPay)
/* 商品列表 增删改查 */
Mock.mock(/good\/add/, 'post', goodApi.addGood)
Mock.mock(/good\/edit/, 'post', goodApi.editGood)
Mock.mock(/good\/getGood/, 'get', goodApi.getGood)
Mock.mock(/good\/del/, 'post', goodApi.deleteGood)

/* 订单列表 增删改查 */
Mock.mock(/order\/add/, 'post', orderApi.addOrder)
Mock.mock(/order\/edit/, 'post', orderApi.editOrder)
Mock.mock(/order\/getorder/, 'get', orderApi.getOrder)
Mock.mock(/order\/del/, 'post', orderApi.deleteOrder)

/* 商品分类 */
Mock.mock(/cate\/getcate/, 'get', cateApi.getCate)
Mock.mock(/cate\/edit/, 'post', cateApi.editCate)
Mock.mock(/cate\/del/, 'post', cateApi.deleteCate)
Mock.mock(/cate\/add/, 'post', cateApi.addCate)
//获取前两级商品分类
Mock.mock(/cate\/getparent/, 'get', cateApi.getParent)

//获取通知消息
Mock.mock(/note\/getnote/, 'get', noteApi.getnote)
